package com.example.daojia.frametest.Activity;

import android.media.Image;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.Toast;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.bumptech.glide.Glide;
import com.example.daojia.frametest.R;
import com.nostra13.universalimageloader.core.ImageLoader;

import java.net.URL;

import butterknife.BindView;
import butterknife.ButterKnife;

@Route(path = "/test/imageLoader")
public class imageLoader extends AppCompatActivity {
    @BindView(R.id.image)
    ImageView imageView;
    String uri;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_image_loader);
        ButterKnife.bind(this);
        uri = getIntent().getStringExtra("data");
        if (!TextUtils.isEmpty(uri)) {
            Glide.with(this).load(uri).into(imageView);
//            ImageLoader.getInstance().displayImage(uri, imageView);
        }
    }
}
